<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://code.google.com/p/granizo" prefix="granizo"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Login</title>
    <link href="<c:url value="/"/>style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div id="container">
      <!-- header -->
      <div id="header">
        <div id="logo"><a href='<c:url value="/"/>'><span class="orange">Yana</span> online shop</a></div>
        <div id="menu">
          <ul>
            <li><a href='<c:url value="/"/>' class="active">home</a></li>
            <li><a href='<c:url value="/admin"/>' >adimn</a></li>
          </ul>
        </div>
      </div>
      <!--end header -->
      <!-- main -->
      <div id="main">
        <div id="content">
            <c:if test="${not empty param.login_error}">
                <font color="red">
                  Your login attempt was not successful, try again.<br/><br/>
                  Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
                </font>
              </c:if>

              <form name="f" action="<c:url value='j_spring_security_check'/>" method="POST">
                <table>
                  <tr>
                    <td>User:</td>
                    <td><input type='text' name='j_username' 
                               value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>'/>
                    </td>
                  </tr>
                  <tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>

                  <tr><td colspan='2'><input name="submit" type="submit" value="Login"></td></tr>
                  <tr><td colspan='2'><input name="reset" type="reset"></td></tr>
                </table>

              </form>
        </div>
      </div>
      <!-- end main -->

      <!-- footer -->
      <div id="footer">
        <div id="left_footer">&copy; Copyright 2013 Yana Potochniak
        </div>
        <div id="right_footer">

          <!-- Please do not change or delete this link. Read the license! Thanks. :-) -->
          Design by <a href="http://www.realitysoftware.ca" title="Website Design">Reality Software</a>

        </div>
      </div>
      <div style="display:none;"><a href="http://free-templates.ru">free-templates.ru</a></div>
      <!-- end footer -->
    </div>
  </body>
</html>
